# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=xcb-util
pkgver=0.4.0
pkgrel=3
pkgdesc="Utility libraries for XC Binding"
arch=('x86_64')
url="https://xcb.freedesktop.org"
license=('custom')
depends=('libxcb>=1.7')
makedepends=('gperf' 'xorg-util-macros' 'xorgproto')
source=("https://xcb.freedesktop.org/dist/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('e60aaa6f582eacd05896c5fd7c8417938318a1288146f3a5b339f77eed24e211c6099963f8813daa621c94173d2934228936b491c0ed79b09a8a67d835867d0e')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() { 
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -D -m644 COPYING \
    "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
